import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}


// 获取cookies
export function getCookies(name) {
  return Cookies.get(name)
}

// 设置cookies
export function setCookies(name, data, time) {
  return Cookies.set(name, data, { expires: time })
}

// 删除cookies
export function removeCookies(name) {
  return Cookies.remove(name)
}
